package my.dataCollection.base.vo;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;



public class ParamVO {

	private String httpHost;
	private int httpPort;
	private String httpURL;
	private String method;
	private String uri;
	private List<NameValuePair> params = new ArrayList<NameValuePair>();
	
    
    public String getHttpURL() {
    	
    	if(StringUtils.isEmpty(this.httpURL)){ 
    		return "http://"+this.httpHost+":"+this.httpPort+"/"+this.uri;
    	}
    	
    	return httpURL;
    }

	
    public void setHttpURL(String httpURL) {
    	this.httpURL = httpURL;
    }

	public String getHttpHost() {
    	return httpHost;
    }
	
    public void setHttpHost(String httpHost) {
    	this.httpHost = httpHost;
    }
	
    
    public int getHttpPort() {
    	return httpPort;
    }

	
    public void setHttpPort(int httpPort) {
    	this.httpPort = httpPort;
    }

	public String getMethod() {
    	return method;
    }
	
    public void setMethod(String method) {
    	this.method = method;
    }
	
    public String getUri() {
    	return uri;
    }
	
    public void setUri(String uri) {
    	this.uri = uri;
    }
	
    public List<NameValuePair> getParams() {
    	return params;
    }
	
    public void addParams(String key, String value) {
    	this.params.add(new BasicNameValuePair(key, value));  
    }  
}
